import 'package:flutter/rendering.dart';

typedef PPCommonActionSheetItemClickCallBack = void Function(
    int index, PPCommonActionSheetItem actionItem);
typedef PPCommonActionSheetItemClickInterceptor = bool Function(
    int index, PPCommonActionSheetItem actionItem);

/// 每行样式
enum PPCommonActionSheetItemStyle {
  /// 默认样式
  normal,

  /// 选中样式，颜色使用主题色号[brandPrimary]
  selected,

  /// 警示项 ，颜色使用[brandError]
  alert,
}

class PPCommonActionSheetItem {
  /// 标题文字
  String title;

  /// 辅助信息
  String? desc;

  /// 图片
  String? image;

  dynamic originData;

  final PPCommonActionSheetItemStyle actionStyle;

  /// 主标题文本样式
  final TextStyle? titleStyle;

  /// 辅助信息文本样式
  final TextStyle? descStyle;

  PPCommonActionSheetItem(
    this.title, {
    this.desc,
    this.image,
    this.actionStyle = PPCommonActionSheetItemStyle.normal,
    this.titleStyle,
    this.descStyle,
    this.originData,
  });
}
